﻿//-----------------------------------------------------------------------
// <copyright file="ConsignFactory.cs" company="Mulala">
//     Copyright Mulala. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Mulala.Cavan.Domain.MainBoundedContext.ConsignModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Mulala.Cavan.Domain.MainBoundedContext.ProprietorModule;
    using Mulala.Cavan.Domain.MainBoundedContext.DictionaryModule;
    using Mulala.Cavan.Domain.MainBoundedContext.NannyModule;
    using Mulala.Cavan.Domain.MainBoundedContext.CorporationModule;

    public static class ConsignFactory
    {
        public static Consign CreateConsign(
                                Proprietor proprietor,
                                string name,
                                int age,
                                int sex,
                                Area area,
                                string address,
                                int experience,
                                long necessarySkill,
                                long firstSkill,
                                long secondSkill,
                                long thirdSkill,
                                ConsignIdentifier.MarriedNeed isMarried,
                                ConsignIdentifier.HasChildrenNeed hasChildren,
                                int degree,
                                int salary,
                                int bidCount,
                                DateTime nextLockTime,
                                ConsignIdentifier.ConsignType type,
                                ConsignIdentifier.ConsignRange range,
                                ConsignIdentifier.ConsignStatus consignStatus,
                                string contact,
                                string telephone,
                                string remark,
                                ConsignIdentifier.CheckedStatus checkedStatus,
                                DateTime systemRecommendTime,
                                DateTime systemRecommendTimeout,
                                IList<ConsignBidder> consignBidders,
                                DateTime editTime,
                                string editUser)
        {
            Consign consign = new Consign();
            consign.Address = address;
            consign.Age = age;
            consign.Area = area;
            consign.BidCount = bidCount;
            consign.CheckedStatus = checkedStatus;
            consign.ConsignBidders = consignBidders;
            consign.Contact = contact;
            consign.Degree = degree;
            consign.EditTime = editTime;
            consign.EditUser = editUser;
            consign.Experience = experience;
            consign.FirstSkill = firstSkill;
            consign.HasChildren = hasChildren;
            consign.ConsignStatus = consignStatus;
            consign.IsMarried = isMarried;
            consign.Name = name;
            consign.NecessarySkill = necessarySkill;
            consign.NextLockTime = nextLockTime;
            consign.Proprietor = proprietor;
            consign.Range = range;
            consign.Remark = remark;
            consign.Salary = salary;
            consign.SecondSkill = secondSkill;
            consign.Sex = sex;
            consign.SystemRecommendTime = systemRecommendTime;
            consign.SystemRecommendTimeout = systemRecommendTimeout;
            consign.Telephone = telephone;
            consign.ThirdSkill = thirdSkill;
            consign.Type = type;
            consign.CreateTime = DateTime.Now;

            return consign;
        }

        public static Consign CreateConsign(int id)
        {
            Consign consign = new Consign();
            consign.ID = id;

            return consign;
        }
    }
}
